https://retellai.com/?utm_source=discord&utm_medium=seo logo
is there a way to have retell send me an AI summar...
# ❓・ai-evy-support
p
@AI Evy is there a way to have retell send me an AI summary of the call through an API when its finished along with a transcript in hipa compliant mode
a
Thanks for tagging me @punk8357. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can retrieve both an AI-generated call summary and transcript via API after a call ends. ## Getting Call Summary & Transcript Use the Get Call endpoint to retrieve call details including: -
call_analysis.call_summary
- AI-generated summary of the call [(1) ]() -
transcript
- Full transcription of the call -
transcript_object
- Transcript as a list of utterances with timestamps
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
The response includes
call_analysis
with the summary:
Copy code
json
"call_analysis": {
  "call_summary": "The agent called the user to ask question about his purchase inquiry...",
  "user_sentiment": "Positive",
  "call_successful": true
}
## HIPAA-Compliant Mode (PII Handling) For sensitive data handling, use the
data_storage_setting
field which supports: -
everything
- stores all data -
everything_except_pii
- excludes PII when possible -
basic_attributes_only
- stores only metadata When PII exclusion is enabled, you can access: -
scrubbed_transcript_with_tool_calls
- transcript without PII -
scrubbed_recording_url
- recording without PII ## Webhook for Real-Time Notification Subscribe to the
call_analyzed
webhook event to receive the call analysis automatically once it's ready after the call ends.
​ To learn more, see the sources I considered: [[1] Get Call](https://docs.retellai.com/api-references/get-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
Can I instruct the AI to summarize it in a specific way?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
p
Can I instruct the AI to summarize it in a specific way? @AI Evy
a
### Answer --- Yes, you can customize how the AI summarizes calls using the
analysis_summary_prompt
field. [(1) ]() ## Customizing the Summary Prompt When creating or updating an agent, set the
analysis_summary_prompt
parameter to provide specific instructions for how the call should be summarized:
Copy code
json
"analysis_summary_prompt": "Summarize the call in a few sentences."
You can replace this default prompt with your own custom instructions to guide the AI's summarization approach. ## Additional Customization Options You can also customize: -
analysis_successful_prompt
- Define criteria for evaluating whether the call was successful -
post_chat_analysis_data
- Extract specific custom data points from the call (string, number, boolean, or selector types) -
post_chat_analysis_model
- Choose which model performs the analysis (options include
gpt-4.1
,
gpt-4.1-mini
,
claude-4.5-sonnet
, etc.) Set
analysis_summary_prompt
to
null
to use the default prompt.
​ To learn more, see the sources I considered: [[1] Create Chat Agent](https://docs.retellai.com/api-references/create-chat-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can "analysis_summary_prompt" be set through an API instead of the front end
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes,
analysis_summary_prompt
can be set via the API when creating or updating agents. ## For Voice Agents Use the Update Voice Agent endpoint with the
analysis_summary_prompt
field in the request body: [(1) ]()
Copy code
json
"analysis_summary_prompt": "Summarize the outcome of the conversation in two sentences."
## For Chat Agents Use the Create Chat Agent or Update Chat Agent endpoints: [(2) ]() , [(3) ]()
Copy code
json
"analysis_summary_prompt": "Summarize the call in a few sentences."
[(2) ]() The field accepts a string (max 2000 characters) that guides how the post-call analysis summary is generated. [(1) ]() Set to
null
to use the default prompt.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[2] Create Chat Agent](https://docs.retellai.com/api-references/create-chat-agent) [[3] Update Chat Agent](https://docs.retellai.com/api-references/update-chat-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can this summarize the call even if it ends early or only if its completed
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The call analysis (including the summary) is generated after the call ends, regardless of how or why it ended. [(1) ]() The
call_analysis
object becomes available after the call ends and includes the summary, sentiment, and success evaluation. The documentation states that various
disconnection_reason
values can trigger the end of a call, including: -
user_hangup
-
agent_hangup
-
inactivity
-
max_duration_reached
-
dial_no_answer
- Various error conditions Since the analysis is performed post-call once the call reaches an
ended
status, it should generate a summary based on whatever conversation occurred before the call ended—whether that was a complete conversation or an early termination. However, the sources don't explicitly document the minimum conversation length required for analysis or how the summary behaves with very short calls. For specifics on edge cases (like calls that end after only a few seconds) , you may want to test or reach out to support. Check out these potentially useful sources: - [Get Call]() - [Contact Sales]()
​ To learn more, see the sources I considered: [[1] Get Call](https://docs.retellai.com/api-references/get-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @punk8357. I'll get back to you soon.
p
@AI Evy what is the best way to find out when the call transcript is ready vs not ready yet
a
### Answer The best way to know when the transcript is ready is to use webhooks. ## Using the
call_ended
Webhook Subscribe to the
call_ended
webhook event, which is triggered when a call completes. [(1) ]() The webhook payload includes the transcript and other call data:
Copy code
json
{
  "event": "call_ended",
  "call": {
    "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
    "transcript": "...",
    "transcript_object": [ [Object], [Object], [Object], [Object] ],
    ...
  }
}
The
call_ended
event includes all fields from the call object except
call_analysis
. ## For Call Analysis (Summary) If you also need the AI-generated summary, subscribe to the
call_analyzed
webhook event, which triggers when call analysis is complete and includes the full call data with the
call_analysis
object. ## Webhook Behavior - The webhook has a 10-second timeout - If no success status (2xx) is received, it retries up to 3 times - Events are triggered in order but are non-blocking For webhook setup details, see [Webhook Overview]() .
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy does retell tell you if the user picked up the last time they were called, if so how?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, Retell tracks whether a user picked up or not through the
call_status
and
disconnection_reason
fields on the call object. [(1) ]() ## Checking Call Outcome Use the Get Call or List Calls API to retrieve call details: [(2) ]() , [(3) ]() The
call_status
field indicates whether the call connected: [(1) ]() -
ended
- Call connected and completed -
not_connected
- Outbound call never connected The
disconnection_reason
field tells you specifically what happened: If the user picked up: -
user_hangup
- User answered and later hung up -
agent_hangup
- User answered, agent ended call -
call_transfer
- User answered, call was transferred If the user did NOT pick up: -
dial_no_answer
- The number dialed did not answer -
dial_busy
- The number dialed is busy -
user_declined
- User explicitly declined the call -
marked_as_spam
- Call blocked as spam ## Example: Query Past Calls
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
[(2) ]() Check
callResponse.call_status
and
callResponse.disconnection_reason
to determine if the user picked up on any previous call to that number.
​ To learn more, see the sources I considered: [[1] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[2] Get Call](https://docs.retellai.com/api-references/get-call) [[3] List Calls](https://docs.retellai.com/api-references/list-calls) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy is there a way to webhook to get back if they picked up or not
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, the
call_ended
webhook provides information about whether the user picked up. ## Using the
call_ended
Webhook The
call_ended
event is triggered when a call completes, transfers, or encounters an error. [(1) ]() The webhook payload includes the
disconnection_reason
field which tells you what happened:
Copy code
json
{
  "event": "call_ended",
  "call": {
    "call_type": "phone_call",
    "from_number": "+12137771234",
    "to_number": "+12137771235",
    "direction": "inbound",
    "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
    "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
    "call_status": "registered",
    "metadata": {},
    "retell_llm_dynamic_variables": {
      "customer_name": "John Doe"
    },
    "start_timestamp": 1714608475945,
    "end_timestamp": 1714608491736,
    "disconnection_reason": "user_hangup",
    "transcript": "...",
    "transcript_object": [ [Object], [Object], [Object], [Object] ],
    "transcript_with_tool_calls": [ [Object], [Object], [Object], [Object] ],
    "opt_out_sensitive_data_storage": false
  }
}
## Key Detail for Unanswered Calls When the call did not connect (like calls with
dial_failed
,
dial_no_answer
,
dial_busy
disconnection reason) , the
call_started
webhook will not be triggered, but the
call_ended
webhook will still fire. So you can check the
disconnection_reason
in the
call_ended
webhook payload to determine if the user picked up or not.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy what will it say if the call is in progress
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer When a call is in progress, the
call_status
field will show
ongoing
. [(1) ]() The
call_status
field has these possible values: -
registered
- Call id issued, starting to make a call using this id -
ongoing
- Call connected and ongoing -
ended
- The underlying websocket has ended for the call (user or agent hung up, or call transferred) -
error
- Call encountered error You can check this via the Get Call API:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
If
callResponse.call_status
equals
ongoing
, the call is currently in progress.
​ To learn more, see the sources I considered: [[1] Get Call](https://docs.retellai.com/api-references/get-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
where do I get the callResponse.call_status @AI Evy? What is the best way to show ongoing and then transition to ended
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Get Call](https://docs.retellai.com/api-references/get-call) [[2] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[3] Outbound Calls (Make Calls)](https://docs.retellai.com/deploy/outbound-call) [[4] call_status is never ongoing](https://discord.com/channels/1186424376300679209/1268232143700754495) ​
### Answer You get
call_status
from the Get Call API response by calling
client.call.retrieve(call_id)
. [(1) ]() ## Best Approach: Use Webhooks The recommended way to track call status transitions is using webhooks rather than polling: [(2) ]() , [(3) ]() 1.
call_started
- Triggered when a new call begins [(2) ]() 2.
call_ended
- Triggered when a call completes, transfers, or encounters an error Set up webhooks to receive instant notifications for these events. [(3) ]() ## If You Need to Poll You can use the Get Call API:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
[(1) ]() The
call_status
field in the response will be one of:
registered
,
ongoing
,
ended
, or
error
. ## Important Note The call only shows
ongoing
if it successfully connected. If the call did not successfully start, it will never show as
ongoing
. [(4) ]() Webhooks are ideal for production systems because they provide real-time updates without polling. [(3) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy do I need to configure my agent to allow these webhooks or by default it is allowed
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- Webhooks can be configured at two levels: account-level or agent-level. [(1) ]() ## Agent-Level Webhook Configuration You can set a
webhook_url
on your agent to receive call events. [(2) ]() When creating or updating an agent, use the
webhook_url
field:
Copy code
json
"webhook_url": "<https://webhook-url-here%22>
If set, this binds webhook events for this agent to the specified URL, and will ignore the account level webhook for this agent. Set to
null
to remove the webhook URL from the agent. You can also configure
webhook_timeout_ms
(defaults to 10000 ms if not set) . ## Account-Level Webhook If no agent-level webhook is configured, the system will use your account-level webhook settings (configured in the dashboard) . So webhooks are not automatically enabled by default—you need to either: 1. Configure an account-level webhook in your dashboard, or 2. Set the
webhook_url
field on your agent via API
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy for the call_started and call_ended webhook do I need to configure that or its there by default?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The
call_started
,
call_ended
, and
call_analyzed
webhook events are available by default—you don't need to configure which events you receive. [(1) ]() However, you do need to configure a webhook URL to receive them. Once you set a webhook URL (either at the account level or agent level) , Retell will automatically POST all three event types (
call_started
,
call_ended
,
call_analyzed
) to that endpoint. ## What You Need to Configure Set the
webhook_url
on your agent: [(2) ]()
Copy code
json
"webhook_url": "<https://webhook-url-here%22>
Once configured, Retell will send all webhook events to that URL. You then filter for the specific event type in your webhook handler by checking the
event
field in the payload: [(1) ]()
Copy code
json
{
  "event": "call_ended",
  "call": {
    ...
  }
}
## Key Point The event types themselves are not individually toggled on/off—they're all sent once you have a webhook URL configured. Your webhook handler should check the
event
field to process only the events you care about (e.g.,
call_started
,
call_ended
, or
call_analyzed
) .
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
for a given agent, can i use code to set the webhook url through an api @User ?
for a given agent, can i use code to set the webhook url through an api @AI Evy ?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, you can set the
webhook_url
for an agent via the API. ## For Voice Agents Use the Create Voice Agent API when creating an agent: [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
Include
webhook_url
in the request body:
Copy code
json
"webhook_url": "<https://webhook-url-here%22>
## For Chat Agents Use the Update Chat Agent API: [(2) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatAgentResponse = await client.chatAgent.update('16b980523634a6dc504898cda492e939') ;
console.log(chatAgentResponse.agent_id) ;
The
webhook_url
field binds webhook events for that agent to the specified URL and will ignore the account-level webhook for this agent. [(1) ]() Set to
null
to remove the webhook URL from the agent.
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Chat Agent](https://docs.retellai.com/api-references/update-chat-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @punk8357. I'll get back to you soon.
p
@AI Evy what if I already made a voice agent? is there a way to update it with the url?
a
### Answer Yes, you can update an existing voice agent's webhook URL using the Update Voice Agent API. [(1) ]() Use the
PATCH /update-agent/{agent_id}
endpoint with the
webhook_url
field in the request body:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
  agent_name: 'Jarvis',
}) ;
console.log(agentResponse.agent_id) ;
To set the webhook URL, include it in the update payload:
Copy code
json
"webhook_url": "<https://webhook-url-here%22>
The
webhook_url
field binds webhook events for this agent to the specified URL and will ignore the account-level webhook for this agent. Set to
null
to remove the webhook URL from the agent.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can I create a voice agent and set it up with its own number through the api? what if i run out of phone numbers? can I buy one through the api?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- Yes, you can do all of this through the API. ## 1. Create a Voice Agent Use the Create Voice Agent API: [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
## 2. Buy a Phone Number via API Yes, you can purchase phone numbers through the API using the Create Phone Number endpoint: [(2) ]() , [(3) ]()
Copy code
javascript
const phoneNumberResponse = await retell.phoneNumber.create({
  inbound_agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD", // replace with the agent id you want to assign
  outbound_agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD", // replace with the agent id you want to assign
}) ;
console.log(phoneNumberResponse) ;
You can optionally specify an
area_code
(3-digit integer, currently US area codes only) . [(2) ]() ## 3. Bind Agent to an Existing Number If you already have a number and want to assign an agent to it, use the Update Phone Number API: [(4) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
  inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
  nickname: 'Frontdesk Number',
  outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
console.log(phoneNumberResponse.inbound_agent_id) ;
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[3] Purchase phone number](https://docs.retellai.com/deploy/purchase-number) [[4] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) ​
## Pricing - **Twilio US numbers**: $2/month [(3) ]() - **Twilio US toll-free**: $5/month - **Telnyx US numbers**: $2/month Phone numbers are yours once purchased and can be used indefinitely.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can you tell/show me how to update an agent and send it a new "analysis_summary_prompt" update. Also, is there a limit to how much text can go into analysis_summary_prompt
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, you can update the
analysis_summary_prompt
for a voice agent using the Update Voice Agent API. [(1) ]() ## How to Update Use the
PATCH /update-agent/{agent_id}
endpoint:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
  agent_name: 'Jarvis',
}) ;
console.log(agentResponse.agent_id) ;
Include
analysis_summary_prompt
in your update payload:
Copy code
json
"analysis_summary_prompt": "Summarize the outcome of the conversation in two sentences."
## Character Limit Yes, there is a limit. The
analysis_summary_prompt
field has a maximum string length of 2000 characters. ## Field Description This prompt guides how the post call analysis summary should be generated. When unset, the default system prompt is used. Set to
null
to use the default prompt.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can I see the summary prompt in the retell front end? if so where? if I update analysis_summary_prompt but my front end also has the agent will they conflict? which one takes precedence
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer I don't have information in the available sources about where to view the
analysis_summary_prompt
in the Retell dashboard/front end, or how the dashboard and API interact when both are used to configure the same agent. [(1) ]() What I can confirm from the documentation: - The
analysis_summary_prompt
field exists and can be updated via the Update Voice Agent API (
PATCH /update-agent/{agent_id}
) . - When unset, the default system prompt is used. Set to
null
to use the default prompt. For specifics about dashboard visibility and precedence when using both the API and dashboard, I'd recommend checking the Retell dashboard directly or reaching out to support. Check out these potentially useful sources: - [Update Voice Agent]() - [Contact Sales]() - [GitHub]() Would you like me to try to answer generally based on my knowledge?
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy if i create an agent is it seen on the retell dashboard or no?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, agents created via the API are visible in the Retell dashboard. [(1) ]() Based on a Discord discussion, a user confirmed they could access their agent in the dashboard using the direct URL format:
Copy code
<https://dashboard.retellai.com/agents/agent_id>
(Replace
agent_id
with your actual agent ID.) There have been reports of agents not appearing in the dashboard search bar even when they exist and are accessible via API or direct URL. [(2) ]() , [(1) ]() If you can't find your agent by searching, try navigating directly using the URL format above with your
agent_id
.
​ To learn more, see the sources I considered: [[1] Agent Dashboard](https://discord.com/channels/1186424376300679209/1404418754867363860) [[2] Agent exists and is published, but API returns "Found agents: 0"](https://discord.com/channels/1186424376300679209/1392892371313754164) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy im getting the below error when trying to update the analysis summary prompt 10:48:46 update-retell-agentedge-function[update-retell-agent] Updating Retell agent { agent_id: "agent_00c700ca8d77ecea0c04e78ce7", has_analysis_summary_prompt: true, analysis_summary_prompt_length: 1981 } 10:48:47 update-retell-agentedge-function[update-retell-agent] Retell API request failed { status: 404, error: "\n" + '\n' + "\n" + '\n' + "Error\n" + "\n" + "\n" + "Cannot PATCH /v2/update-agent/agent_00c700ca8d77ecea0c04e78ce7\n" + "\n" + "\n" } Show less 10:48:47 network-requests[404] POST https://nawjmqtdoqhfwquumxbw.supabase.co/functions/v1/update-retell-agent (830ms)
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The 404 error is caused by an incorrect URL path. Your request is hitting
/v2/update-agent/
but the correct endpoint uses
/update-agent/
(not
/v2/
) . [(1) ]() ## Correct Endpoint The Update Voice Agent endpoint path is:
Copy code
PATCH /update-agent/{agent_id}
[(2) ]() ## Correct SDK Usage Use the Retell SDK like this:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
  agent_name: 'Jarvis',
}) ;
console.log(agentResponse.agent_id) ;
## Fix Update your Supabase edge function to use the correct API base URL: ` with the path
/update-agent/{agent_id}
(no
/v2/
prefix) . [(1) ]() If you're making direct HTTP requests instead of using the SDK, ensure your URL is:
Copy code
<https://api.retellai.com/update-agent/agent_00c700ca8d77ecea0c04e78ce7>
Your
analysis_summary_prompt_length
of 1981 characters is within the 2000 character limit, so that's not the issue. [(2) ]()
​ To learn more, see the sources I considered: [[1] URGENT: 404 Error - Cannot Retrieve Agent agent_24a7b7382eca64e0fcbe118931 via API](https://discord.com/channels/1186424376300679209/1382991998654480505) [[2] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
how do I assugn my specific phone numebr to a voice agent when I use the create agent endpoint
@AI Evy how do I assugn my specific phone numebr to a voice agent when I use the create agent endpoint
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer You cannot assign a phone number directly when creating an agent—these are separate operations. [(1) ]() ## Two-Step Process Step 1: Create the voice agent [(2) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
Step 2: Update your existing phone number to bind it to the agent Use the Update Phone Number API to assign your phone number to the agent you just created: [(1) ]() , [(3) ]()
Copy code
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
  inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
  nickname: 'Frontdesk Number',
}) ;
Set
inbound_agent_id
for inbound calls and/or
outbound_agent_id
for outbound calls, using your newly created agent's ID. [(4) ]()
​ To learn more, see the sources I considered: [[1] Add phone number in creating agent](https://discord.com/channels/1186424376300679209/1379772980942344306) [[2] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[3] 404 Error on Create a Phone Call](https://retell.discourse.group/t/404-error-on-create-a-phone-call/22) [[4] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can you explain how to Set inbound_agent_id for inbound calls and/or outbound_agent_id for outbound calls, using your newly created agent's ID. (4)
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) [[2] Purchase phone number](https://docs.retellai.com/deploy/purchase-number) ​
### Answer After creating your voice agent, you bind it to a phone number using the Update Phone Number API. [(1) ]() ## Setting
inbound_agent_id
and
outbound_agent_id
Use the
PATCH /update-phone-number/{phone_number}
endpoint:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
 inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
 nickname: 'Frontdesk Number',
 outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
console.log(phoneNumberResponse.inbound_agent_id) ;
## What Each Field Does - **`inbound_agent_id`**: The number will automatically use this agent when receiving inbound calls. If set to
null
, this number would not accept inbound calls. - **`outbound_agent_id`**: The number will automatically use this agent when conducting outbound calls. If set to
null
, this number would not be able to initiate outbound calls without an agent id override. ## Example Workflow 1. Create your agent and note the returned
agent_id
2. Call
client.phoneNumber.update()
with your phone number in E.164 format (e.g.,
+14157774444
) 3. Pass your agent's ID to
inbound_agent_id
(for receiving calls) and/or
outbound_agent_id
(for making calls) You can assign different agents for inbound vs outbound, or use the same agent for both. [(2) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy i got the below error when creating an agent. is the endpoint wrong? [create-retell-agent] Creating Retell agent { llm_id: "llm_b171b36ab6996b489b4fe57d26f1", voice_id: "11labs-Adrian" } 11:19:06 network-requests[404] POST https://nawjmqtdoqhfwquumxbw.supabase.co/functions/v1/create-retell-agent (808ms) 11:19:06 create-retell-agentedge-function[create-retell-agent] Retell create-agent failed { status: 404, error: "\n" + '\n' + "\n" + '\n' + "Error\n" + "\n" + "\n" + "Cannot POST /v2/create-agent\n" + "\n" + "\n" } Show less
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, the endpoint path is incorrect. Your request is hitting
/v2/create-agent
but the correct endpoint does not use a
/v2/
prefix. [(1) ]() ## Correct Endpoint The Create Voice Agent endpoint is:
Copy code
POST /create-agent
## Correct API URL Update your Supabase edge function to use:
Copy code
<https://api.retellai.com/create-agent>
## Correct SDK Usage If using the Retell SDK:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
## Additional Notes Users have also encountered 404 errors when using an invalid
voice_id
. [(2) ]() , [(3) ]() Double-check that
11labs-Adrian
is a valid voice ID in your account.
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] 404 when creating agent with /create-agent](https://discord.com/channels/1186424376300679209/1392679614882517042) [[3] Create Agent (API endpoint)](https://discord.com/channels/1186424376300679209/1424438362458161182) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy what is wrong with this endpoint? 11:27:33 network-requests[404] POST https://nawjmqtdoqhfwquumxbw.supabase.co/functions/v1/create-retell-agent (888ms) 11:27:33 create-retell-agentedge-function[create-retell-agent] Retell update-phone-number failed { status: 404, error: "\n" + '\n' + "\n" + '\n' + "Error\n" + "\n" + "\n" + "Cannot PATCH /update-phone-number\n" + "\n" + "\n" }
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Here is how that can be fixed](https://retell.discourse.group/t/here-is-how-that-can-be-fixed/23) ​
### Answer The 404 error is because the endpoint path is missing the phone number. The correct endpoint requires the phone number in the URL path, not just
/update-phone-number
. ## Correct Endpoint Format The Update Phone Number endpoint path should be:
Copy code
PATCH /update-phone-number/{phone_number}
[(1) ]() Your request is hitting
/update-phone-number
without the phone number appended. ## Fix Update your Supabase edge function to include the phone number (in E.164 format) in the URL path:
Copy code
<https://api.retellai.com/update-phone-number/+14157774444>
## Correct SDK Usage
Copy code
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
 inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
 nickname: 'Frontdesk Number',
 outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
Replace
+14157774444
with your actual phone number in E.164 format.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I select a multi prompt agent when creating the agent, give it voice cimo, give it a title, and give it general instructions
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer When creating a voice agent, you configure these through the Create Voice Agent API (
POST /create-agent
) . [(1) ]() ## Setting the Response Engine (Multi-Prompt / Retell LLM) Use the
response_engine
field to attach your LLM. For a Retell LLM (which supports multi-prompt/LLM States) , specify the
llm_id
you created:
Copy code
json
"response_engine": {
  "type": "retell-llm",
  "llm_id": "llm_234sdertfsdsfsdf",
  "version": 0
}
## Setting the Voice Use the
voice_id
field. For "cimo", you'll need to use the exact voice ID as listed in your dashboard. The documentation shows the format:
Copy code
javascript
voice_id: '11labs-Adrian',
Replace
'11labs-Adrian'
with the correct voice ID for "cimo" from your Dashboard. ## Setting the Agent Title Use the
agent_name
field:
Copy code
json
"agent_name": "Jarvis"
## General Instructions General instructions (the system prompt) are configured in the *Response Engine (LLM) *, not in the agent creation call itself. The
response_engine
references an `llm_id`—that LLM is where you define your prompt and instructions. ## Full Example
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
Add
agent_name
to the payload for your title. For general instructions, create/update your Retell LLM separately with your prompt content.
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​
p
I mean for the agent title that I see in the retell dashboard, how do I set that @AI Evy
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The agent title you see in the Retell dashboard is set using the
agent_name
field when creating or updating your agent. [(1) ]() ## When Creating an Agent Include
agent_name
in your create payload:
Copy code
javascript
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
  agent_name: 'Jarvis',
}) ;
## When Updating an Existing Agent
Copy code
javascript
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
  agent_name: 'Jarvis',
}) ;
[(2) ]() ## Field Details -
agent_name
(
string | null
) : The name of the agent. Only used for your own reference. [(1) ]() This is the title that appears in the Retell dashboard for identifying your agent.
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I update the universal prompt of the agent
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer I don't have information in the available sources about how to update the universal prompt of a multi-prompt agent via the API. The sources show how to update voice agent settings (like
agent_name
,
analysis_summary_prompt
, voice settings, etc.) using the Update Voice Agent API, but the universal prompt configuration for multi-prompt/LLM States agents is managed through the Response Engine (Retell LLM) , not directly on the agent object. [(1) ]() Based on the documentation: - The
response_engine
field on an agent references an
llm_id
- Multi-prompt agents organize conversations into a structured tree of states, each with its own focused prompt [(2) ]() - General instructions and prompts are configured in the LLM, not in the agent creation/update calls To update the universal prompt, you would need to update the Retell LLM itself (the
llm_id
your agent references) , not the agent directly. Check out these potentially useful sources: - [Single/Multi Prompt Agent Overview]() - [Update Voice Agent]() - [Step 2: Configure the basic settings]() Would you like me to try to answer generally based on my knowledge?
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[2] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can I create a node for the agent with the api?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, you can create nodes via the API when creating a Conversation Flow agent. [(1) ]() Nodes are defined in the
nodes
array when you call the Create Conversation Flow endpoint:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
 model_choice: { model: 'gpt-4.1', type: 'cascading' },
 nodes: [
 {
 id: 'start',
 instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
 type: 'conversation',
 },
 ],
 start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
## Key Points - Conversation Flow agents use nodes as building blocks—each node represents a step in the conversation flow [(2) ]() - Node types include: Conversation Node, Extract DV Node, Function Node, SMS Node, MCP Node, Call Transfer Node, Transfer Agent Node, Press Digit Node, End Node, and Logic Split Node - You define nodes in the
nodes
array with properties like
id
,
type
, and
instruction
[(1) ]() Note: This applies to Conversation Flow agents, not Multi-Prompt agents. Multi-Prompt agents use LLM States configured through the Retell LLM, not the node-based system.
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[2] Node Overview](https://docs.retellai.com/build/conversation-flow/node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I set the general instructions for the agent through the api
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer General instructions are set on the Retell LLM, not on the agent itself. The agent's
response_engine
references an
llm_id
, and that LLM is where you configure the
general_prompt
. [(1) ]() ## Setting General Instructions When Creating a Retell LLM Use the
general_prompt
field in the Create Retell LLM endpoint:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const llmResponse = await client.llm.create() ;
console.log(llmResponse.llm_id) ;
Include
general_prompt
in your request body:
Copy code
json
{
  "general_prompt": "You are ..."
}
## Updating General Instructions on an Existing Retell LLM Use the Update Retell LLM endpoint (
PATCH /update-retell-llm/{llm_id}
) : [(2) ]() The
general_prompt
field is described as: - General prompt appended to system prompt no matter what state the agent is in. - System prompt (with state) = general prompt + state prompt. - System prompt (no state) = general prompt. ## Important Note on Versions If you update the LLM via API, it creates a draft version. To have your agent use the updated prompt without publishing in the dashboard, set your agent to use the draft version at the phone number level. [(3) ]() [(4) ]()
​ To learn more, see the sources I considered: [[1] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Discord message from @userrk1329 on 2025-08-13](https://discord.com/channels/1186424376300679209/1294891368505937952/1405073658904444969) [[4] Discord message from @userrk1329 on 2025-08-13](https://discord.com/channels/1186424376300679209/1294891368505937952/1405220586338390186) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy is there a way to update the general prompt outside the create endpoint? maybe in an update endpoint?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, use the Update Retell LLM endpoint to update the
general_prompt
on an existing LLM. [(1) ]() ## Update Endpoint
Copy code
PATCH /update-retell-llm/{llm_id}
## SDK Example
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939', {
  begin_message: 'Hey I am a virtual assistant calling from Retell Hospital.',
}) ;
console.log(llmResponse.llm_id) ;
Replace
begin_message
with
general_prompt
in your payload:
Copy code
json
{
  "general_prompt": "You are ..."
}
## Field Details -
general_prompt
(
string | null
) : General prompt appended to system prompt no matter what state the agent is in. - System prompt (with state) = general prompt + state prompt - System prompt (no state) = general prompt ## Version Note If you're using versions, make sure to set the version as well in your update request. [(2) ]() Changes made via API create a draft version—set your agent to the draft version at the phone number level in the dashboard to have changes take effect without publishing. [(3) ]()
​ To learn more, see the sources I considered: [[1] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[2] Discord message from @userrk1329 on 2025-08-13](https://discord.com/channels/1186424376300679209/1294891368505937952/1405073658904444969) [[3] Discord message from @userrk1329 on 2025-08-13](https://discord.com/channels/1186424376300679209/1294891368505937952/1405220586338390186) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I update the webhook url for the agent
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
### Answer Use the Update Voice Agent endpoint to update the
webhook_url
for your agent. [(1) ]() ## Endpoint
Copy code
PATCH /update-agent/{agent_id}
## SDK Example
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
 agent_name: 'Jarvis',
}) ;
console.log(agentResponse.agent_id) ;
Replace
agent_name
with
webhook_url
in your payload:
Copy code
json
{
  "webhook_url": "<https://webhook-url-here%22>
}
## Field Details -
webhook_url
(
string | null
) : The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook) . If set, will bind webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to
null
to remove webhook url from this agent.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can I also put the webhook url when creating the agent? if so how
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, you can set the
webhook_url
when creating the agent. [(1) ]() ## Field Details -
webhook_url
(
string | null
) : The webhook for agent to listen to call events. If set, will bind webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to
null
to remove webhook url from this agent. ## Example
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
Add
webhook_url
to your create payload:
Copy code
json
{
  "response_engine": { "llm_id": "llm_234sdertfsdsfsdf", "type": "retell-llm" },
  "voice_id": "11labs-Adrian",
  "webhook_url": "<https://webhook-url-here%22>
}
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[2] Discord message from @userrk1329 on 2025-08-13](https://discord.com/channels/1186424376300679209/1294891368505937952/1405073658904444969) [[3] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) ​
### Answer When you update the
general_prompt
via API, it creates a draft version of the LLM—not the published version. [(1) ]() The dashboard typically displays the published version by default, which is why you may not see your changes reflected there. ## Why This Happens The API response includes these relevant fields: - `is_published`: Whether the Retell LLM Response Engine is published - `version`: The version of the LLM When you update via API, the changes go to a draft. [(2) ]() ## How to See/Use Your Updated Prompt Based on community feedback, you have a few options: 1. Set your agent to use the Draft version at the phone number level in the dashboard—this allows the agent to use the unpublished changes without manually publishing. 2. Create a new LLM via API, then update your agent to use the new `llm_id`—this approach has been confirmed to work. 3. Verify the update worked by calling the Get Retell LLM endpoint to confirm your
general_prompt
was saved:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const llmResponse = await client.llm.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(llmResponse.llm_id) ;
[(3) ]() Check the response to see if your
general_prompt
value is present in the returned object.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I set the agent to use the draft version with the api? is it done on creating it or updating it?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Setting an agent to use the draft version is done at the phone number level, not directly on the agent itself via create or update. ## How to Set Draft Version From the dashboard, go to the Phone Numbers tab and set your agent to the Draft version. [(1) ]() If you select
Draft
, it will always fetch the latest version of the agent. ## Via Dashboard (Phone Numbers Tab) Set your agent at the draft version from the dashboard at the phone numbers tab—then any change you make through the API or the dashboard will affect the agent without publishing it. [(2) ]() ## API Approach You can use the version number as a parameter when creating calls or phone numbers. For example: [(1) ]()
Copy code
get_agent(version=2) # Gets the version with version number 2.
get_agent() # Gets the latest version of the agent.
The version parameter can be used in
create_phone_number
to ensure the phone uses the correct version of the agent. ## Important Note If you're using versions, make sure to set the version as well in your requests. [(3) ]() The draft version is the "latest version" that hasn't been published yet—selecting
Draft
at the phone number level ensures your API changes take effect immediately without requiring a publish step.
​ To learn more, see the sources I considered: [[1] Setup versioning for agents](https://docs.retellai.com/agent/version) [[2] Discord message from @omar.13. on 2025-08-13](https://discord.com/channels/1186424376300679209/1294891368505937952/1405226164376571948) [[3] Discord message from @userrk1329 on 2025-08-13](https://discord.com/channels/1186424376300679209/1294891368505937952/1405220586338390186) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy is RETELL_LLM_ID provided when you create an agent or just from the dashboard
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The
llm_id
is not provided when you create an agent—you must create the Retell LLM first (via API or dashboard) , and then use that
llm_id
when creating the agent. [(1) ]() ## Workflow 1. Create the Retell LLM first using the Create Retell LLM endpoint (
POST /create-retell-llm
) . The response includes the
llm_id
. [(2) ]() 2. Then create the agent, referencing that
llm_id
in the
response_engine
field:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
[(1) ]() ## Summary - The
llm_id
comes from creating a Retell LLM (via API or dashboard) - When creating an agent, you provide the
llm_id
in the
response_engine
object—it is not auto-generated by the agent creation call
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I pass the summary instructions to the agent when I create it or afterwards?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer You can set summary instructions using the
analysis_summary_prompt
field when creating or updating the agent. [(1) ]() [(2) ]() ## When Creating a Voice Agent Include
analysis_summary_prompt
in your create payload:
Copy code
javascript
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
  analysis_summary_prompt: 'Summarize the outcome of the conversation in two sentences.',
}) ;
[(1) ]() ## When Updating an Existing Agent
Copy code
javascript
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
  analysis_summary_prompt: 'Summarize the outcome of the conversation in two sentences.',
}) ;
[(2) ]() ## Field Details -
analysis_summary_prompt
(
string | null
) : Prompt to guide how the post call or chat analysis summary should be generated. When unset, the default system prompt is used. Set to
null
to use the default prompt. - Maximum string length:
2000
This field controls the instructions for generating the call summary in post-call analysis.
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy whats better for extracting information in a linear manner from someone with instructions at each step/node, a multi prompt agent or conversation flow agent?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer For extracting information in a linear, step-by-step manner with specific instructions at each node, Conversation Flow is the better choice. [(1) ]() ## Why Conversation Flow Conversation Flow provides the most control over dialogue paths and is ideal for: [(2) ]() - Multiple decision branches (more than 3-4 conditional paths) [(1) ]() - Deterministic tool calling and transitions - **Precise Response Control**: Fine-tune the exact words spoken during and after each function execution [(3) ]() - **Enhanced Node and Transition Definitions**: Define edges and transitions with greater accuracy to create seamless interactions ## Key Advantages for Linear Information Extraction - **Node-Based Structure**: Each conversation is broken down into nodes that define specific interactions or responses [(4) ]() - **Conditional Transitions**: You can set conditions for transitioning between nodes, ensuring that the agent responds appropriately based on previous inputs - **Minimized Hallucination Risks**: Built-in ultra-guidance mechanisms ensure accurate and reliable responses [(3) ]() - **Skip Response setting**: Useful when you want the agent to say things like disclaimers where you don't need a response to move on to another node [(5) ]() ## When Multi-Prompt Might Still Work Multi-prompt tends to be good when the conversation flow is not quite as clear or more open-ended. [(6) ](
86424376300679209/1294891368505937952/1347322184116469850) However, for your use case of linear extraction with instructions at each step, Conversation Flow's node-based editor with explicit transition logic will give you more predictable, controllable behavior. [(7) ]()
​ To learn more, see the sources I considered: [[1] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[2] Retell AI’s Advanced Conversation Flow | Retell AI](https://www.retellai.com/blog/unlocking-complex-interactions-with-retell-ais-conversation-flow) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[4] Training & Customizing AI Voice Agents | Retell AI](https://www.retellai.com/blog/training-and-customizing-voice-agents-with-retell-ai) [[5] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) [[6] Discord message from @sanava.ai on 2025-03-06](https://discord.com/channels/1186424376300679209/1294891368505937952/1347322184116469850) [[7] Inside Retell AI | The Conversational AI Platform Behind Scalable AI Phone Systems | Retell AI](https://www.retellai.com/blog/inside-retell-ai-conversational-ai-phone-system) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy does conversation flow agent still have a general prompt? how do I create this at create agent
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- Yes, Conversation Flow agents have a global prompt. [(1) ]() ## Setting Global Prompt via API When creating a Conversation Flow using the Create Conversation Flow endpoint, include the
global_prompt
field:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
 model_choice: { model: 'gpt-4.1', type: 'cascading' },
 nodes: [
 {
 id: 'start',
 instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
 type: 'conversation',
 },
 ],
 start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
Add
global_prompt
to your request body:
Copy code
json
{
  "global_prompt": "You are a helpful customer service agent."
}
## Field Details -
global_prompt
(
string | null
) : Global prompt used in every node of the conversation flow. [(1) ]() [(2) ]() ## How to Use Global Prompt vs Node Instructions - Use the global prompt for your agent's overall personality, tone, and universal rules. [(3) ]() - Use conversation flow nodes for step-by-step logic, questions, and transitions. - Use global nodes only for actions available anytime (e.g., "transfer to human") .
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[2] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[3] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy what differs from the api that creates the conversatinFlow from the multiprompt agent
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[2] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[4] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) [[5] Discord message from @tomas_27050 on 2025-06-04](https://discord.com/channels/1186424376300679209/1294891368505937952/1379810518176497684) ​
### Answer The key differences between the Conversation Flow API and Multi-Prompt Agent API are: ## Architecture Conversation Flow uses a dedicated
Create Conversation Flow
endpoint that returns a
conversation_flow_id
. [(1) ]() It uses nodes, edges, and functions as core components where each node defines a small set of logic and transition conditions determine which node to transition to. Multi-Prompt Agent uses the
Create Retell LLM
endpoint to create a structured tree of states, each with its own focused prompt and behavior. You then reference the
llm_id
when creating an agent. [(2) ]() ## Control Level Conversation Flow provides: - Dynamic LLM Selection: Change the LLM for each individual node [(3) ]() - Precise Response Control: Fine-tune the exact words spoken during and after each function execution - Node settings like
Skip Response
,
Block Interruptions
, and per-node LLM selection [(4) ]() Multi-Prompt organizes conversations into states with: - Focused Prompt per state - State-Specific Functions - Transition Logic between states [(2) ]() ## API Availability There is a Conversation Flow API available in the SDK for creating and managing conversation flows programmatically. [(3) ]() For multi-prompt agents, there are no API endpoints specifically for conversational flows—you use the standard Create Retell LLM and Create Agent endpoints. [(5) ]() ## Pricing Conversation Flow pricing is calculated based on
time spent in each node (seconds) multiplied by the model price per second for that specific node. [(1) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy do I still create a voice agent that is used by client.conversationFlow.create or thats done during client.conversationFlow.create
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer You still need to **create a Voice Agent separately**—`client.conversationFlow.create` only creates the Conversation Flow itself, not the agent. ## Workflow 1. Create the Conversation Flow using
client.conversationFlow.create
, which returns a
conversation_flow_id
[(1) ]() 2. Create a Voice Agent that references the conversation flow via the
response_engine
field ## Creating the Conversation Flow
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
 model_choice: { model: 'gpt-4.1', type: 'cascading' },
 nodes: [
 {
 id: 'start',
 instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
 type: 'conversation',
 },
 ],
 start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
## Then Create the Voice Agent After getting the
conversation_flow_id
, you create an agent with
response_engine
set to type
conversation-flow
(similar to how you'd use
llm_id
with type
retell-llm
for multi-prompt agents) . The Conversation Flow is the **response engine**—the Voice Agent is what ties it to a voice, phone number, webhook, and other agent-level settings.
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can you show me how to "Then Create the Voice Agent After getting the conversation_flow_id, you create an agent with response_engine set to type conversation-flow (similar to how you'd use llm_id with type retell-llm for multi-prompt agents) . The Conversation Flow is the response engine—the Voice Agent is what ties it to a voice, phone number, webhook, and other agent-level settings. ​ To learn more, see the sources I considered:"
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer To create a Voice Agent with a Conversation Flow as the response engine, you use the
response_engine
field with type
conversation-flow
and provide the
conversation_flow_id
. [(1) ]() ## Example
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
For a Conversation Flow agent, modify the
response_engine
to use the
conversation_flow_id
you received from `client.conversationFlow.create`:
Copy code
json
{
  "type": "conversation-flow",
  "conversation_flow_id": "your_conversation_flow_id_here"
}
## Full Workflow
Copy code
javascript
// Step 1: Create the Conversation Flow
const conversationFlowResponse = await client.conversationFlow.create({
  model_choice: { model: 'gpt-4.1', type: 'cascading' },
  nodes: [
    {
      id: 'start',
      instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
      type: 'conversation',
    },
  ],
  start_speaker: 'agent',
}) ;
[(2) ]()
Copy code
javascript
// Step 2: Create the Voice Agent using the conversation_flow_id
const agentResponse = await client.agent.create({
  response_engine: { 
    type: 'conversation-flow', 
    conversation_flow_id: conversationFlowResponse.conversation_flow_id 
  },
  voice_id: '11labs-Adrian',
}) ;
The
response_engine
object supports three types:
retell-llm
,
conversation-flow
, and
custom-llm
. [(3) ]() , [(1) ]()
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I programatically api wise add nodes from start to end in the convo flow agent?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer To programmatically add multiple nodes from start to end in a Conversation Flow, you define them in the
nodes
array when calling
client.conversationFlow.create
, and use
edges
within each node to define transitions to the next node. [(1) ]() ## Example with Multiple Connected Nodes
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
 model_choice: { model: 'gpt-4.1', type: 'cascading' },
 nodes: [
 {
 id: 'start',
 instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
 type: 'conversation',
 },
 ],
 start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
To connect nodes, add
edges
to each node with
destination_node_id
pointing to the next node:
Copy code
json
{
 "id": "start",
 "type": "conversation",
 "instruction": {
 "type": "prompt",
 "text": "Greet the customer and ask how you can help them."
 },
 "edges": [
 {
 "id": "edge_1",
 "transition_condition": {
 "type": "prompt",
 "prompt": "Customer wants to book appointment"
 },
 "destination_node_id": "book_appointment"
 }
 ]
 }
## Key Structure - **`nodes`**: Array of node objects, each with a unique
id
and
type
- **`edges`**: Connections between nodes defined by
transition_condition
and
destination_node_id
- **`start_node_id`**: Set this to specify which node begins the flow Each node can have multiple edges for different transition conditions, allowing you to build linear or branching flows programmatically. [(2) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[2] Node Overview](https://docs.retellai.com/build/conversation-flow/node) ​
p
@AI Evy how would I do the same thing, make nodes that go in order, with the multi prompt mode
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer In multi-prompt agents, you use states instead of nodes. Each state has its own prompt, and you define edges to transition between states in order. [(1) ]() ## Creating Sequential States via API Use the
states
array when creating a Retell LLM, with
edges
defining the transition to the next state:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939', {
 begin_message: 'Hey I am a virtual assistant calling from Retell Hospital.',
}) ;
console.log(llmResponse.llm_id) ;
[(2) ]() ## State Structure with Edges
Copy code
json
[
 {
 "name": "information_collection",
 "state_prompt": "You will follow the steps below to collect information...",
 "edges": [
 {
 "destination_state_name": "appointment_booking",
 "description": "Transition to book an appointment."
 }
 ],
 "tools": []
 },
 {
 "name": "appointment_booking",
 "state_prompt": "You will follow the steps below to book an appointment...",
 "tools": []
 }
]
[(3) ]() ## Key Fields - **`states`**: Array of state objects, each with a
name
and
state_prompt
- **`edges`**: Define transitions with
destination_state_name
and
description
- **`starting_state`**: Required—set this to the name of your first state (e.g.,
"information_collection"
) ## Defining Transition Logic in the Prompt In each state's prompt, specify when to transition: [(4) ]()
Copy code
7. Ask if user is interested in an in person tour.
 - if yes, transition to schedule_tour.
 - if no or hesitant, call function end_call to hang up politely and say will reach out if any other interesting properties pop up.
This creates a linear flow where states execute in order based on the edge conditions you define.
​ To learn more, see the sources I considered: [[1] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[4] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy do dynamic varibales work in conversation flow agents? do i add them to prompts with {{variable}}
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, dynamic variables work in Conversation Flow agents using the
{{variable_name}}
syntax. [(1) ]() ## Where You Can Use Dynamic Variables Dynamic variables can be used in: - **Prompts**: Agent instructions and personality - **Begin message**: Opening greeting - **Tool configurations**: Custom function URLs, tool descriptions, property descriptions - **Call handling**: Voicemail prompts and messages, transfer call phone numbers, warm transfer instructions - Webhook URL ## Example in Prompts
Copy code
"Hello {{user_name}}, I understand you're interested in {{product_name}}. How can I help you today?"
## Using in Transition Conditions For equation-based transition conditions in Conversation Flow, you can use dynamic variables: [(2) ]()
Copy code
- {{user_location}} == "New York"
- {{user_age}} < 18 OR {{user_location}} == "New York"
- {{name}} exists
**Note**: You can only use variables that are passed in as dynamic variables for equation conditions. If you need to use information extracted by the LLM during the call, you should use prompt conditions instead. ## Passing Dynamic Variables for Outbound Calls When using the Create Phone Call API, set your variables in the
retell_llm_dynamic_variables
field: [(1) ]()
Copy code
json
{
 "user_name": "John Smith",
 "product_name": "Premium Plan",
 "account_status": "active"
}
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.